package com.qztc.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {

    @Bean
    public OpenAPI customOpenAPI() {

        Info info = new Info()
                .title("汉服租聘平台消费者的后端接口文档")
                .description("所有业务相关接口说明")
                .version("1.0")
                .license(new License()
                        .name("Apache License Version 2.0")
                        .url("https://www.apache.org/licenses/LICENSE-2.0"))
                .contact(new Contact()
                        .name("郑齐航")
                        .url("https://gitee.com/zheng-qihang123/hire_end")
                        .email("2607255819@qq.com"));

        return new OpenAPI()
                .info(info);
    }
}
